package com.gec.zhs.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 系统授权规制表
 * @TableName dataprivilegerule
 */
@TableName(value ="dataprivilegerule")
@Data
public class Dataprivilegerule implements Serializable {
    /**
     * 数据ID
     */
    @TableId
    private String id;

    /**
     * 资源标识（模块编号）
     */
    private String sourcecode;

    /**
     * 二级资源标识
     */
    private String subsourcecode;

    /**
     * 权限描述
     */
    private String description;

    /**
     * 排序号
     */
    private Integer sortno;

    /**
     * 权限规则
     */
    private String privilegerules;

    /**
     * 是否可用
     */
    private Integer enable;

    /**
     * 创建时间
     */
    private Date createtime;

    /**
     * 创建人ID
     */
    private String createuserid;

    /**
     * 创建人
     */
    private String createusername;

    /**
     * 最后更新时间
     */
    private Date updatetime;

    /**
     * 最后更新人ID
     */
    private String updateuserid;

    /**
     * 最后更新人
     */
    private String updateusername;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Dataprivilegerule other = (Dataprivilegerule) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getSourcecode() == null ? other.getSourcecode() == null : this.getSourcecode().equals(other.getSourcecode()))
            && (this.getSubsourcecode() == null ? other.getSubsourcecode() == null : this.getSubsourcecode().equals(other.getSubsourcecode()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getSortno() == null ? other.getSortno() == null : this.getSortno().equals(other.getSortno()))
            && (this.getPrivilegerules() == null ? other.getPrivilegerules() == null : this.getPrivilegerules().equals(other.getPrivilegerules()))
            && (this.getEnable() == null ? other.getEnable() == null : this.getEnable().equals(other.getEnable()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getCreateuserid() == null ? other.getCreateuserid() == null : this.getCreateuserid().equals(other.getCreateuserid()))
            && (this.getCreateusername() == null ? other.getCreateusername() == null : this.getCreateusername().equals(other.getCreateusername()))
            && (this.getUpdatetime() == null ? other.getUpdatetime() == null : this.getUpdatetime().equals(other.getUpdatetime()))
            && (this.getUpdateuserid() == null ? other.getUpdateuserid() == null : this.getUpdateuserid().equals(other.getUpdateuserid()))
            && (this.getUpdateusername() == null ? other.getUpdateusername() == null : this.getUpdateusername().equals(other.getUpdateusername()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getSourcecode() == null) ? 0 : getSourcecode().hashCode());
        result = prime * result + ((getSubsourcecode() == null) ? 0 : getSubsourcecode().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getSortno() == null) ? 0 : getSortno().hashCode());
        result = prime * result + ((getPrivilegerules() == null) ? 0 : getPrivilegerules().hashCode());
        result = prime * result + ((getEnable() == null) ? 0 : getEnable().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getCreateuserid() == null) ? 0 : getCreateuserid().hashCode());
        result = prime * result + ((getCreateusername() == null) ? 0 : getCreateusername().hashCode());
        result = prime * result + ((getUpdatetime() == null) ? 0 : getUpdatetime().hashCode());
        result = prime * result + ((getUpdateuserid() == null) ? 0 : getUpdateuserid().hashCode());
        result = prime * result + ((getUpdateusername() == null) ? 0 : getUpdateusername().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", sourcecode=").append(sourcecode);
        sb.append(", subsourcecode=").append(subsourcecode);
        sb.append(", description=").append(description);
        sb.append(", sortno=").append(sortno);
        sb.append(", privilegerules=").append(privilegerules);
        sb.append(", enable=").append(enable);
        sb.append(", createtime=").append(createtime);
        sb.append(", createuserid=").append(createuserid);
        sb.append(", createusername=").append(createusername);
        sb.append(", updatetime=").append(updatetime);
        sb.append(", updateuserid=").append(updateuserid);
        sb.append(", updateusername=").append(updateusername);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}